#define  _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
    int removeElement(vector<int>& nums, int val) {
        int element_size = nums.size();
        int count = 0;
        for (int i = 0; i < element_size; i++)
        {
            if (nums[i] == val)
            {
                count++;
                for (int j = i + 1; j < element_size; j++)
                {
                    nums[j - 1] = nums[j];
                }
                i--;
            }
        }
        return element_size - count;
    }
};
int main()
{
    Solution s;
    vector<int> nums = { 3,2,2,3 };
    s.removeElement(nums, 3);
	return 0;
}